<%--各个区域的所有笔记--%>
<%@ page import="pojo.Note" %>
<%@ page import="dao.ImplementManager" %>
<%@ page import="java.util.ArrayList" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<style>
    .title_left{
        margin-left: 420px;
    }
    .content_left{
        border:1px solid black;
        width: 440px;
        margin-left: 420px;
        height: 100px;
        margin-bottom: 20px;
    }
    .delete{
        margin-left: 790px;
    }
    .end{
margin-left: 740px;
    }
</style>
<script>
    function deleteNote(id){
        if(confirm("您确定删除吗？")){
            location.href="${pageContext.request.contextPath}/areadeleServlet?id="+id;
        }
    }
</script>
<body>
<%
    String type= (String) session.getAttribute("type");
    ImplementManager implementManager=new ImplementManager();
    ArrayList<Note> areanote=implementManager.areaNote(type);
    request.setAttribute("areanote",areanote);
%>
<h3 align="center" }>${type}笔记</h3>
<div class="end">
    <a href="areaCheckedNotes.jsp" type="submit" id="note">待审核笔记</a>
    <a href="${pageContext.request.contextPath}/areaUsers.jsp" type="submit" id="userinfo">用户中心</a>
</div>
<c:forEach items="${areanote}" var="note" varStatus="s">
    <c:if test="${note.style==1}">
    <form>
        <table>
            <tr>
                <td>
                    <h5 class="title_left">${note.title}</h5>
                    <a href="javascript:deleteNote(${note.id});" class="delete" type="submit">删除</a>
                    <p class="content_left">${note.content}</p>
                </td>
            </tr>
        </table>
    </form>
</c:if>
</c:forEach>
</body>
</html>
